package edu.java.lectures.lec06.abstrclasses;

public class Square extends Figure {

    // private double a;

    public Square(double a) {
	super(a);
    }

    // --- Methods -------------------------------------------------------------

    @Override
    public Square getMiSelf() {
	return this;
    }

    @Override
    public double calculatePerimeter() {
	return getA() * 4;
    }

    @Override
    public double calculateSurface() {
	double a = getA();
	return a * a;
    }

    // --- Getters and Setters -------------------------------------------------

    // public void setA(double a) {
    // this.a = a;
    // }
    //
    // public double getA() {
    // return a;
    // }

}
